package com.pmy.service;

import com.pmy.pojo.Bill;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.List;

public class BillServiceImplImpl {
    ApplicationContext impl = new ClassPathXmlApplicationContext("applicationContext.xml");

    @Test
    public void getBillServiceTest(){
        BillService billServiceImpl = impl.getBean("BillServiceImpl", BillService.class);
        int billCount = billServiceImpl.getBillCount(null, null, "2");
        System.out.println(billCount);

        List<Bill> bills = billServiceImpl.queryAll(null, null, null, 0, 20);
        for (Bill bill : bills) {
            System.out.println(bill);
        }
    }
}
